import { defHttp } from '/@/utils/http/axios';

enum Api {
  AddPerson = '/web/personage/dic/add',
  DelPerson = '/web/personage/dic/delete/{id}',
  GetPersonInfo = '/web/personage/dic/detail/{id}',
  UpdatePerson = '/web/personage/dic/edit',
  GetPersonList = '/web/personage/dic/list',
}

/**
 * @description: 新增人员
 */
export function addPerson(params: any) {
  return defHttp.post<any>({
    url: Api.AddPerson,
    params,
  });
}
/**
 * @description: 删除人员
 */
export function delPerson(params: any) {
  return defHttp.post<any>({
    url: Api.DelPerson,
    params,
  });
}
/**
 * @description: 获取人员信息
 */
export function getPersonInfo(params: any) {
  return defHttp.get<any>({
    url: Api.GetPersonInfo,
    params,
  });
}

/**
 * @description: 更新人员信息
 */
export function updatePerson(params: any) {
  return defHttp.post<any>({
    url: Api.UpdatePerson,
    params,
  });
}

/**
 * @description: 获取人员信息列表
 */
export function getPersonList(params: any) {
  return defHttp.post<any>({
    url: Api.GetPersonList,
    params,
  });
}
